import { registerAs } from '@nestjs/config';

export default registerAs('api', () => ({
  mysql: {
    name: 'nestjs_api',
    type: 'mysql',
    host: '117.72.16.70',
    port: 3306,
    username: 'nestjs_api',
    password: 'MM1314520m',
    database: 'nestjs_api',
    autoLoadEntities: true,
    retryDelay: 3000,
    retryAttempts: 3,
    synchronize: true,
    // logging: 'all', // 打印所有的 SQL 语句和参数
    entities: [__dirname + '/entities/*.entity{.ts,.js}'],
  },
}));
